Skip to content

refactor(client-presence): Refactor/Rename APIs #24384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 17, 2025

Conversation

WillieHabi
Copy link
Contributor

@WillieHabi WillieHabi commented Apr 16, 2025

Description

This change implements all the renaming/reshaping of Presence API presented in this table (All changes made to API surface can be found in .changest/sour-mirrors-wave):

Before 2.33.0 2.33.0
acquirePresence getPresence
acquirePresenceViaDataObject getPresenceViaDataObject
ClientSessionId AttendeeId
IPresence Presence
IPresence.events["attendeeJoined"] Presence.attendees.events["attendeeConnected"]
IPresence.events["attendeeDisconnected"] Presence.attendees.events["attendeeDisconnected"]
IPresence.getAttendee Presence.attendees.getAttendee
IPresence.getAttendees Presence.attendees.getAttendees
IPresence.getMyself Presence.attendees.getMyself
IPresence.getNotifications Presence.notifications.getWorkspace
IPresence.getStates Presence.states.getWorkspace
ISessionClient Attendee
Latest (import) StateFactory
Latest (call) StateFactory.latest
LatestEvents.updated LatestEvents.remoteUpdated
LatestMap (import) StateFactory
LatestMap (call) StateFactory.latestMap
LatestMapEvents.itemRemoved LatestMapEvents.remoteItemRemoved
LatestMapEvents.itemUpdated LatestMapEvents.remoteItemUpdated
LatestMapEvents.updated LatestMapEvents.remoteUpdated
LatestMapItemValueClientData LatestMapItemUpdatedClientData
LatestMapValueClientData LatestMapClientData
LatestMapValueManager LatestMap
LatestMapValueManager.clients LatestMap.getStateAttendees
LatestMapValueManager.clientValue LatestMap.getRemote
LatestMapValueManager.clientValues LatestMap.getRemotes
LatestMapValueManagerEvents LatestMapEvents
LatestValueClientData LatestClientData
LatestValueData LatestData
LatestValueManager Latest
LatestValueManager.clients Latest.getStateAttendees
LatestValueManager.clientValue Latest.getRemote
LatestValueManager.clientValues Latest.getRemotes
LatestValueManagerEvents LatestEvents
LatestValueMetadata LatestMetadata
PresenceEvents.attendeeDisconnected AttendeesEvents.attendeeDisconnected
PresenceEvents.attendeeJoined AttendeesEvents.attendeeConnected
PresenceNotifications NotificationsWorkspace
PresenceNotificationsSchema NotificationsWorkspaceSchema
PresenceStates StatesWorkspace
PresenceStatesEntries StatesWorkspaceEntries
PresenceStatesSchema StatesWorkspaceSchema
PresenceWorkspaceAddress WorkspaceAddress
PresenceWorkspaceEntry StatesWorkspaceEntry
SessionClientStatus AttendeeStatus
ValueMap StateMap

## Description
Renaming of value manager presence APIs

See .changeset/sour-mirrors-wave.md for all changes. 
 
Documentation changes were made as well where old name was previously
mentioned. Wouldn't want doc changes to block the renames so review here
is welcome but they can be cleaned up later.
Restructuring of Presence API

All changes added in .changest/sour-mirrors-wave:

Docs have been updated as well to reflect changes. Only thing remaining
after this will be to pass root Presence to workspace and "value
manager" level
@Copilot Copilot AI review requested due to automatic review settings April 16, 2025 16:34
@WillieHabi WillieHabi requested a review from a team as a code owner April 16, 2025 16:34
@github-actions github-actions bot added area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: runtime Runtime related issues area: website changeset-present public api change Changes to a public API labels Apr 16, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 49 out of 49 changed files in this pull request and generated 1 comment.

@github-actions github-actions bot added the base: main PRs targeted against main branch label Apr 16, 2025
…presence.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@WillieHabi WillieHabi requested a review from tylerbutler April 16, 2025 17:28
… include `remote` (#24387)

## Description

| Original | New |
|----------|-----|
| `LatestEvents.updated` | `LatestEvents.remoteUpdated` |
| `LatestMapEvents.itemRemoved` | `LatestMapEvents.remoteItemRemoved` |
| `LatestMapEvents.itemUpdated` | `LatestMapEvents.remoteItemUpdated` |
| `LatestMapEvents.updated` | `LatestMapEvents.remoteUpdated` |
@jason-ha jason-ha changed the title refactor(client-presence): Rename Presence APIs refactor(client-presence): Refactor/Rename APIs Apr 16, 2025
| `SessionClientStatus` | `AttendeeStatus` |
| `ValueMap` | `StateMap` |

> [!NOTE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[proselint.Annotations] 'NOTE' left in text.

@jason-ha jason-ha requested a review from tylerbutler April 17, 2025 06:31
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  163664 links
    1315 destination URLs
    1547 URLs ignored
       0 warnings
       0 errors


Copy link
Member

@tylerbutler tylerbutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@WillieHabi WillieHabi merged commit ea95ef0 into main Apr 17, 2025
40 checks passed
@WillieHabi WillieHabi deleted the test/client/presence-refactor branch April 17, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: runtime Runtime related issues area: website base: main PRs targeted against main branch changeset-present public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants